package cn.codeforfun.controller;

import cn.codeforfun.bean.Seckill;
import cn.codeforfun.service.SeckillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping("/seckill")
@Controller
public class SeckillController {

    @Autowired
    private SeckillService seckillService;

    @RequestMapping("/list")
    @ResponseBody
    public List<Seckill> list() {
        return seckillService.list();
    }

}
